package com.menghanjun.mhjresourcesharing.mapper;

import com.menghanjun.mhjresourcesharing.entity.TResources;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.menghanjun.mhjresourcesharing.vo.TResourcesVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author menghanjun
 * @since 2024-04-19
 */
@Repository
public interface TResourcesMapper extends BaseMapper<TResources> {

    List<TResourcesVo> getResourcesList(@Param("type") String type, @Param("title") String title,@Param("resourceId") String resourceId,@Param("level") String level, int offset, int limit,@Param("order") String order);

    int getResourcesListTotal(@Param("type") String type,@Param("title") String title,@Param("resourceId")String resourceId,@Param("level")String level);

    void updateResource(TResources resources);

    TResourcesVo getResourceVoById(@Param("resourceId") String resourceId);

    void deleteResourceById(@Param("resourceId") String resourceId);

    void addClikCount(@Param("resourceId") String resourceId);

    List<TResourcesVo> queryResourcesList(@Param("type") String type, @Param("title") String title,@Param("resourceId") String resourceId,@Param("level") String level, int offset, int limit,@Param("order") String order);

    int queryResourcesListTotal(@Param("type") String type,@Param("title") String title,@Param("resourceId")String resourceId,@Param("level")String level);
}
